home *** CD-ROM | disk | FTP | other *** search
Text File | 1988-05-08 | 957 b | 25 lines | [TEXT/MPS ] |
- # LookupDeclaration - look up the declaration for a pascal identifier
- #
- # Usage:
- # Don't call from a window or a script.
- # LookupDeclaration should be installed in the menu by
- # AddMenu Find 'Lookup Declaration/L' "LookupDeclaration ≥ Dev:Null"
- #
- # LookupDeclaration grabs the pascal identifier selected in the active window,
- # and opens the interface file defining that identifier at the declaration.
- #
- # Copyright Norbert Lindenberg 1988
- # All rights reserved.
-
- Set Tokensep "[¬a-zA-Z_0-9]"
- Find Δ\{Tokensep}\!1 "{Active}" || Find • "{Active}"
- Find §:Δ/{Tokensep}/ "{Active}" || Find §:∞ "{Active}"
- Set Pattern `Catenate "{Active}".§` ≥ Dev:Null || ∂
- ( Alert -s ∂
- 'Sorry, cannot figure out the identifier you want to have explained.'; ∂
- Exit 1)
- SearchDeclaration -a -r "{Pattern}" > "{MPW}"OpenDeclaration ≥ Dev:Null || ∂
- ( Alert -s "Sorry, no declaration found for ∂"{Pattern}∂"." ; Exit 1)
- "{MPW}"OpenDeclaration ≥ Dev:Null || Exit 1
- Exit 0
-